package celiasoft.itasalib.query;

import celiasoft.itasalib.filegatherer.XMLGatherer;
import celiasoft.itasalib.query.resultparser.QueryMyItasaEpisodesResultParser;
import celiasoft.itasalib.query.resultparser.IQueryResultParser;
import celiasoft.itasalib.staticdata.ItasaStaticUrls;

public class MyItasaNextEpisodesQuery extends Query {

	private String _authcode;
	private int _page;

	public MyItasaNextEpisodesQuery(XMLGatherer gatherer, String apikey) {
		super(gatherer, apikey);
	}

	@Override
	protected String getQueryUrl() {
		return String.format(ItasaStaticUrls.MYITASA_NEXT_EPISODES_URL,
				getAPIKey(), this._authcode, this._page);
	}

	public String getAuthcodeKey() {
		return this._authcode.toString();
	}

	public void setAuthcodeKey(String key) {
		this._authcode = key.toString();
	}

	public int getPage() {
		return this._page;
	}

	public void setPage(int page) {
		this._page = page;
	}

	@Override
	protected IQueryResultParser getResultParser() {
		return new QueryMyItasaEpisodesResultParser();
	}

}
